package com.woniuxy.cloud.userassembly.utils;

import java.util.Random;

/**
 * @description:
 * @author: ZXG
 * @time: 2021/9/27
 */
public class RandomCode {
    /**
     * 生成6位数的随机验证码
     * @return String
     */
    public static String getCode(){
         Random random = new Random();
         StringBuilder sd = new StringBuilder();
         for(int i=0;i<6;i++){
             sd.append(random.nextInt(10));
         }
         return sd.toString();
     }
}
